<?php
/*
 In this file you will find some examples of what can be done with a Wonderflux child theme.

If you want to create your own child theme for Wonderflux:
1) Duplicate the wonderflux-girder (this!) directory and all files
2) Change directory name
3) Call your theme something different in style.css
4) You are good to go!

*/

// Note: new MANDITORY include in child theme function file as of 0.891 beta
// This is required as a child theme functions file loads before the framework theme functions file
// Therefore, we load it here to ensure that certain functionality is available straight away to a Wonderflux child theme

// Wonderflux child theme core functions - REQUIRED
include ''.TEMPLATEPATH.'/wf-includes/wf-theme-core.php';

// IMPORTANT - We are currently putting 'layout code' functions in another file called 'functions-layout.php' and PHP include it
// You dont have to do this - it can all go in functions.php (this file!) - but this makes things tidier

// Include our main CSS styling functions
include 'functions-layout.php';

// SETUP WORDPRESS WIDGET AREAS ///////

// "wf_widgets" is a theme core function that allows the easy setup and configuration of WordPress widgets within your theme
// It defines and (optionally - on by default) inserts your widget area in one function using the Wonderflux display hook system
// Supply the "location" parameter the value "my_custom_theme_code" to stop the auto-insertion
// IMPORTANT - if you use "my_custom_theme_code" location, you must insert this using standard WordPress theme code for your widgets to show in your theme!

wflux_theme_core::wf_widgets(
array (

	/* All parameters */
	array (
			"name" => "Above Sidebar",
			"description" => "Drag widgets into here to include them above the sidebar on all pages.",
			"location" => "wfsidebar_before_all_content",
			"container" => "div",
			"containerclass" => "custom-widget-block",
			"containerid" => "widget1",
			"titlestyle" => "h4",
			"titleclass" => "custom-widget-title",
			"titleid" => "custom-widget-title",
			"before" => "",
			"after" => ""
	),

	/* Simpler example */
	array (
			"name" => "Below Sidebar",
			"description" => "Drag widgets into here to include them below the sidebar on all pages.",
			"location" => "wfsidebar_after_all_content",
			"titleclass" => "bottom-custom-widget-title"
	),

	/* Even simpler example! */
	array (
			"location" => "wfmain_before_all_content",
			"name" => "Above Content"
	)

)
);

// EXAMPLE - REMOVING A CORE WONDERFLUX FUNCTION

/**
*
* @since 0.1
* @updated 0.2
*
* Example of removing a function called in the core Wonderflux theme code
* See Wonderflux source for more - will be easier to see what you can do once we start on documentation!
* If you want to remove more, simply add them to the my_wf_unhook_core_functions below, no need to create more functions!
*
*/
function my_wf_unhook_core_functions() {

	// 'wf_display_css_info' is a core Wonderflux display function
	// It displays the current design configuration as set under Wonderflux -> Style Lab options in admin area
	// Visit the site and 'view source' to see sizing configuration other important information
	// Shown as comment in <head>
	remove_action('wf_head_meta', 'wf_display_css_info');


}
// Uncomment out the line below to hide it from your site <head> section
//add_action('init','my_wf_unhook_core_functions');



// EXAMPLE - ADDING A FILTER

/**
*
* @since 0.1
* @updated 0.1
*
* Example of filtering a core Wonderflux function
* Core functionality can be filtered from child theme - allowing us to change and manipulate stuff easily while still keeping the original functionality intact.
*
*/
function my_wf_filter_my_wf_functions() {
	// Just a simple text string to appear at the bottom of the page in the code as a HTML comment (view source)
	return 'Designed by me! Powered by WordPress and the Wonderflux theme framework - GPL ROCKS!';
}
// 'wflux_comment_footer_credit' is the name of the item setup for filtering
add_filter( 'wflux_comment_footer_credit', 'my_wf_filter_my_wf_functions' );



// EXAMPLE - REPLACING A CORE WONDERFLUX FUNCTION
// By using the same name as used in the Wonderflux functions.php file, we can over-ride the existing core Wonderflux function
// Often filters will be your best choice, but if you really want to do something fancy, you can!


function wf_display_head_title() {

	$this_desc = esc_attr( get_bloginfo( 'description', 'display' ) );

	$output = '<title>';
	$output .= 'Howdy Beta Testers! ' . $this_desc . ' - this rocks!';
	$output .= '</title>';

	echo $output;

}


// EXAMPLE - USING A HOOK TO INSERT CONTENT
// Throughout all the Wonderflux theme display files which have lots of hooks (view wonderflux/wf-includes/wf-display-hooks.php to see all of them)
// You create a function with your content in and 'hook' it to the Wonderflux template hook using add_action
// It will become clearer how and when to use these with documentation!

/**
*
* @since 0.1
* @updated 0.1
*
* Adds a chunk of layout code
*
*/
function my_wf_hook_example() {

	// You could just use an include or even your own template_part if more than a few lines/need more functionality!
	$output_left = '<div class="feature-box-left">';
	$output_left .= '<h2>Howdy campers!</h2>';
	$output_left .= '<p class="feature-text">Cool! I just got put in on every page on my site - no template editing!</p>';
	$output_left .= '</div>';

	$output_right = '<div class="feature-box-right">';
	$output_right .= '<h2>About WFX Girder</h2>';
	$output_right .= '<p class="feature-text">This is a private beta testing demonstration theme for the Wonderflux theme framework.</p>';
	$output_right .= '</div>';

	echo '<div ';
		wflux_display::wf_css('size=full');
	echo ' id="feature">';

		echo '<div ';
		wflux_display::wf_css('size=half');
		echo '>';
		echo $output_left;
		echo '</div>';

		echo '<div ';
		wflux_display::wf_css('size=half&last=y');
		echo '>';
		echo $output_right;
		echo '</div>';

	echo '</div>';
}
//By setting a priority of '1' on this I can make it appear above anything else that uses the same hook
add_action( 'wfmain_after_all_last_content', 'my_wf_hook_example', 1);


/**
*
* @since 0.1
* @updated 0.1
*
* Add cufon to the head of the document
* Next beta will have display functions for this (and other font rendering technology)
* NOT ACTIVE AT MOMENT
*
*/
/*
function my_wf_cufon() {

	$output = '<script src="'.WF_INCLUDES_URL.'/js/cufon-yui.js" type="text/javascript"></script>';
	$output .= '<script src="'.get_bloginfo('stylesheet_directory').'/js/League_Gothic_400.font.js" type="text/javascript"></script>';
	$output .= '<script type="text/javascript">';
	$output .= "Cufon.replace('h1');";
	$output .= "Cufon.replace('h2');";
	$output .= "Cufon.replace('h3');";
	$output .= "Cufon.replace('h4');";
	$output .= "Cufon.replace('h5');";
	$output .= '</script>';
	$output .= "\n";
	echo $output;

}
*/
// NOT ACTIVE AT MOMENT
//add_action( 'wf_head_meta', 'my_wf_cufon' );



////////////// CORE WORDPRESS FUNCTIONS MAINLY FOR DEBUGGING!

// Read Justin's great post on WordPress custom taxonomies http://justintadlock.com/archives/2010/06/10/a-refresher-on-custom-taxonomies
function register_my_taxonomies() {

	register_taxonomy(
		'taxotester',
		array( 'post' ),
		array(
			'public' => true,
			'labels' => array(
				'name' => __( 'Taxo Testers' ),
				'singular_name' => __( 'Taxo Tester' )
			),
		)
	);
}
add_action( 'init', 'register_my_taxonomies', 0 );


function minky () {
	wflux_display_ex_ie::wf_png_ie6('');
}
add_action( 'wf_head_meta', 'minky' );




?>